home *** CD-ROM | disk | FTP | other *** search
-
-
-
- MPROTECT C Library Procedures MPROTECT
-
-
-
- NNAAMMEE
- mprotect - set protection of memory mapping
-
- SSYYNNOOPPSSIISS
- ##iinncclluuddee <<ssyyss//mmmmaann..hh>>
- mmpprrootteecctt((aaddddrr,, lleenn,, pprroott))
- ccaaddddrr__tt aaddddrr;; iinntt lleenn,, pprroott;;
-
- DDEESSCCRRIIPPTTIIOONN
- mmpprrootteecctt(()) changes the access protections on the mappings
- specified by the range [_a_d_d_r, _a_d_d_r + _l_e_n) to be that speci-
- fied by _p_r_o_t. Legitimate values for _p_r_o_t are the same as
- those permitted for mmmmaapp(2).
-
- RREETTUURRNN VVAALLUUEE
- mmpprrootteecctt(()) returns 0 on success, -1 on failure.
-
- EERRRROORRSS
- mmpprrootteecctt(()) will fail if:
-
- EACCES _p_r_o_t specifies a protection which
- violates the access permission the pro-
- cess has to the underlying memory
- object.
-
- EINVAL _a_d_d_r is not a multiple of the page size
- as returned by ggeettppaaggeessiizzee(2).
-
- ENOMEM Addresses in the range [_a_d_d_r, _a_d_d_r +
- _l_e_n) are invalid for the address space
- of a process, or specify one or more
- pages which are not mapped.
-
- When mmpprrootteecctt(()) fails for reasons other than EINVAL, the
- protections on some of the pages in the range [_a_d_d_r, _a_d_d_r +
- _l_e_n) will have been changed. If the error occurs on some
- page at address _a_d_d_r_2, then the protections of all whole
- pages in the range [_a_d_d_r, _a_d_d_r_2) have been modified.
-
- SSEEEE AALLSSOO
- ggeettppaaggeessiizzee(2), mmmmaapp(2)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Sprite v1.0 25 September 1987 1
-
-
-
-